package com.it.schoolhomeos.enums;

/**
 * 通知状态枚举
 */
public enum NotificationStatus {
    /**
     * 草稿
     */
    DRAFT(0),
    
    /**
     * 已发布
     */
    PUBLISHED(1),
    
    /**
     * 已撤回
     */
    REVOKED(2);
    
    private final int value;
    
    NotificationStatus(int value) {
        this.value = value;
    }
    
    public int getValue() {
        return value;
    }
    
    public static NotificationStatus fromValue(int value) {
        for (NotificationStatus status : NotificationStatus.values()) {
            if (status.getValue() == value) {
                return status;
            }
        }
        throw new IllegalArgumentException("Invalid NotificationStatus value: " + value);
    }
} 